package com.aishua.fire.config.kaptcha;

import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.util.Random;

import com.google.code.kaptcha.GimpyEngine;
import com.google.code.kaptcha.NoiseProducer;
import com.google.code.kaptcha.util.Configurable;
import com.jhlabs.image.RippleFilter;
import com.jhlabs.image.ShadowFilter;
import com.jhlabs.image.TransformFilter;

/**
 * 我的自定义图片扭曲类
 * @author Administrator
 *
 */
public class MyGimpy extends Configurable implements GimpyEngine {

	@Override
	public BufferedImage getDistortedImage(BufferedImage baseImage) {
		//添加默认的干扰线
//		NoiseProducer noiseProducer = getConfig().getNoiseImpl();
		
//		ShadowFilter shadowFilter = new ShadowFilter();
//		shadowFilter.setOpacity(1);
//		BufferedImage effectImage = shadowFilter.filter(baseImage, null);
		
		// draw lines over the image and/or text
//		noiseProducer.makeNoise(effectImage, .1f, .1f, .25f, .25f);
//		noiseProducer.makeNoise(effectImage, .1f, .25f, .5f, .9f);
	
		return baseImage;
	}

}
